YES 0.852
H-Termination proof of /home/matraf/haskell/eval_FullyBlown_Fast/FiniteMap.hs
H-Termination of the given Haskell-Program with start terms could successfully be proven:
↳ HASKELL
↳ BR
mainModule FiniteMap
| ((foldFM_GE :: (Ordering -> b -> a -> a) -> a -> Ordering -> FiniteMap Ordering b -> a) :: (Ordering -> b -> a -> a) -> a -> Ordering -> FiniteMap Ordering b -> a) |
module FiniteMap where
| import qualified Maybe import qualified Prelude
|
| data FiniteMap b a = EmptyFM | Branch b a Int (FiniteMap b a) (FiniteMap b a)
|
| instance (Eq a, Eq b) => Eq (FiniteMap a b) where
|
| foldFM_GE :: Ord a => (a -> b -> c -> c) -> c -> a -> FiniteMap a b -> c
foldFM_GE | k z fr EmptyFM | = | z |
foldFM_GE | k z fr (Branch key elt _ fm_l fm_r) | |
| | key >= fr | = |
foldFM_GE k (k key elt (foldFM_GE k z fr fm_r)) fr fm_l |
|
| | otherwise | = |
|
|
|
module Maybe where
| import qualified FiniteMap import qualified Prelude
|
Replaced joker patterns by fresh variables and removed binding patterns.
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
mainModule FiniteMap
| ((foldFM_GE :: (Ordering -> a -> b -> b) -> b -> Ordering -> FiniteMap Ordering a -> b) :: (Ordering -> a -> b -> b) -> b -> Ordering -> FiniteMap Ordering a -> b) |
module FiniteMap where
| import qualified Maybe import qualified Prelude
|
| data FiniteMap a b = EmptyFM | Branch a b Int (FiniteMap a b) (FiniteMap a b)
|
| instance (Eq a, Eq b) => Eq (FiniteMap b a) where
|
| foldFM_GE :: Ord c => (c -> b -> a -> a) -> a -> c -> FiniteMap c b -> a
foldFM_GE | k z fr EmptyFM | = | z |
foldFM_GE | k z fr (Branch key elt vw fm_l fm_r) | |
| | key >= fr | = |
foldFM_GE k (k key elt (foldFM_GE k z fr fm_r)) fr fm_l |
|
| | otherwise | = |
|
|
|
module Maybe where
| import qualified FiniteMap import qualified Prelude
|
Cond Reductions:
The following Function with conditions
foldFM_GE | k z fr EmptyFM | = z |
foldFM_GE | k z fr (Branch key elt vw fm_l fm_r) |
| | key >= fr |
= | foldFM_GE k (k key elt (foldFM_GE k z fr fm_r)) fr fm_l |
|
| | otherwise | |
|
is transformed to
foldFM_GE | k z fr EmptyFM | = foldFM_GE3 k z fr EmptyFM |
foldFM_GE | k z fr (Branch key elt vw fm_l fm_r) | = foldFM_GE2 k z fr (Branch key elt vw fm_l fm_r) |
foldFM_GE1 | k z fr key elt vw fm_l fm_r True | = foldFM_GE k (k key elt (foldFM_GE k z fr fm_r)) fr fm_l |
foldFM_GE1 | k z fr key elt vw fm_l fm_r False | = foldFM_GE0 k z fr key elt vw fm_l fm_r otherwise |
foldFM_GE0 | k z fr key elt vw fm_l fm_r True | = foldFM_GE k z fr fm_r |
foldFM_GE2 | k z fr (Branch key elt vw fm_l fm_r) | = foldFM_GE1 k z fr key elt vw fm_l fm_r (key >= fr) |
foldFM_GE3 | k z fr EmptyFM | = z |
foldFM_GE3 | wv ww wx wy | = foldFM_GE2 wv ww wx wy |
The following Function with conditions
compare | x y |
| | x == y | |
| | x <= y | |
| | otherwise | |
|
is transformed to
compare | x y | = compare3 x y |
compare2 | x y True | = EQ |
compare2 | x y False | = compare1 x y (x <= y) |
compare1 | x y True | = LT |
compare1 | x y False | = compare0 x y otherwise |
compare3 | x y | = compare2 x y (x == y) |
The following Function with conditions
is transformed to
undefined0 | True | = undefined |
undefined1 | | = undefined0 False |
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
mainModule FiniteMap
| (foldFM_GE :: (Ordering -> b -> a -> a) -> a -> Ordering -> FiniteMap Ordering b -> a) |
module FiniteMap where
| import qualified Maybe import qualified Prelude
|
| data FiniteMap b a = EmptyFM | Branch b a Int (FiniteMap b a) (FiniteMap b a)
|
| instance (Eq a, Eq b) => Eq (FiniteMap a b) where
|
| foldFM_GE :: Ord a => (a -> b -> c -> c) -> c -> a -> FiniteMap a b -> c
foldFM_GE | k z fr EmptyFM | = | foldFM_GE3 k z fr EmptyFM |
foldFM_GE | k z fr (Branch key elt vw fm_l fm_r) | = | foldFM_GE2 k z fr (Branch key elt vw fm_l fm_r) |
|
|
foldFM_GE0 | k z fr key elt vw fm_l fm_r True | = | foldFM_GE k z fr fm_r |
|
|
foldFM_GE1 | k z fr key elt vw fm_l fm_r True | = | foldFM_GE k (k key elt (foldFM_GE k z fr fm_r)) fr fm_l |
foldFM_GE1 | k z fr key elt vw fm_l fm_r False | = | foldFM_GE0 k z fr key elt vw fm_l fm_r otherwise |
|
|
foldFM_GE2 | k z fr (Branch key elt vw fm_l fm_r) | = | foldFM_GE1 k z fr key elt vw fm_l fm_r (key >= fr) |
|
|
foldFM_GE3 | k z fr EmptyFM | = | z |
foldFM_GE3 | wv ww wx wy | = | foldFM_GE2 wv ww wx wy |
|
module Maybe where
| import qualified FiniteMap import qualified Prelude
|
Haskell To QDPs
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
new_foldFM_GE(wz3, LT, Branch(EQ, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, LT, wz64, h, ba)
new_foldFM_GE(wz3, EQ, Branch(LT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, EQ, wz64, h, ba)
new_foldFM_GE(wz3, GT, Branch(LT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, GT, wz64, h, ba)
new_foldFM_GE(wz3, EQ, Branch(EQ, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, EQ, wz64, h, ba)
new_foldFM_GE(wz3, LT, Branch(GT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, LT, wz63, h, ba)
new_foldFM_GE(wz3, GT, Branch(EQ, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, GT, wz64, h, ba)
new_foldFM_GE(wz3, GT, Branch(GT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, GT, wz64, h, ba)
new_foldFM_GE(wz3, LT, Branch(LT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, LT, wz64, h, ba)
new_foldFM_GE(wz3, EQ, Branch(GT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, EQ, wz63, h, ba)
new_foldFM_GE(wz3, LT, Branch(EQ, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, LT, wz63, h, ba)
new_foldFM_GE(wz3, LT, Branch(LT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, LT, wz63, h, ba)
new_foldFM_GE(wz3, EQ, Branch(EQ, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, EQ, wz63, h, ba)
new_foldFM_GE(wz3, GT, Branch(GT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, GT, wz63, h, ba)
new_foldFM_GE(wz3, EQ, Branch(GT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, EQ, wz64, h, ba)
new_foldFM_GE(wz3, LT, Branch(GT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, LT, wz64, h, ba)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 3 SCCs.
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_foldFM_GE(wz3, GT, Branch(EQ, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, GT, wz64, h, ba)
new_foldFM_GE(wz3, GT, Branch(LT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, GT, wz64, h, ba)
new_foldFM_GE(wz3, GT, Branch(GT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, GT, wz64, h, ba)
new_foldFM_GE(wz3, GT, Branch(GT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, GT, wz63, h, ba)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_foldFM_GE(wz3, GT, Branch(EQ, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, GT, wz64, h, ba)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 > 3, 4 >= 4, 5 >= 5
- new_foldFM_GE(wz3, GT, Branch(LT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, GT, wz64, h, ba)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 > 3, 4 >= 4, 5 >= 5
- new_foldFM_GE(wz3, GT, Branch(GT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, GT, wz64, h, ba)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 > 2, 3 > 3, 4 >= 4, 5 >= 5
- new_foldFM_GE(wz3, GT, Branch(GT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, GT, wz63, h, ba)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 > 2, 3 > 3, 4 >= 4, 5 >= 5
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_foldFM_GE(wz3, EQ, Branch(LT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, EQ, wz64, h, ba)
new_foldFM_GE(wz3, EQ, Branch(GT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, EQ, wz63, h, ba)
new_foldFM_GE(wz3, EQ, Branch(EQ, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, EQ, wz64, h, ba)
new_foldFM_GE(wz3, EQ, Branch(EQ, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, EQ, wz63, h, ba)
new_foldFM_GE(wz3, EQ, Branch(GT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, EQ, wz64, h, ba)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_foldFM_GE(wz3, EQ, Branch(EQ, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, EQ, wz64, h, ba)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 > 2, 3 > 3, 4 >= 4, 5 >= 5
- new_foldFM_GE(wz3, EQ, Branch(LT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, EQ, wz64, h, ba)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 > 3, 4 >= 4, 5 >= 5
- new_foldFM_GE(wz3, EQ, Branch(GT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, EQ, wz63, h, ba)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 > 3, 4 >= 4, 5 >= 5
- new_foldFM_GE(wz3, EQ, Branch(EQ, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, EQ, wz63, h, ba)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 > 2, 3 > 3, 4 >= 4, 5 >= 5
- new_foldFM_GE(wz3, EQ, Branch(GT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, EQ, wz64, h, ba)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 > 3, 4 >= 4, 5 >= 5
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
Q DP problem:
The TRS P consists of the following rules:
new_foldFM_GE(wz3, LT, Branch(EQ, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, LT, wz64, h, ba)
new_foldFM_GE(wz3, LT, Branch(LT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, LT, wz64, h, ba)
new_foldFM_GE(wz3, LT, Branch(EQ, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, LT, wz63, h, ba)
new_foldFM_GE(wz3, LT, Branch(LT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, LT, wz63, h, ba)
new_foldFM_GE(wz3, LT, Branch(GT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, LT, wz63, h, ba)
new_foldFM_GE(wz3, LT, Branch(GT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, LT, wz64, h, ba)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_foldFM_GE(wz3, LT, Branch(GT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, LT, wz63, h, ba)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 > 3, 4 >= 4, 5 >= 5
- new_foldFM_GE(wz3, LT, Branch(EQ, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, LT, wz64, h, ba)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 > 3, 4 >= 4, 5 >= 5
- new_foldFM_GE(wz3, LT, Branch(LT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, LT, wz64, h, ba)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 > 2, 3 > 3, 4 >= 4, 5 >= 5
- new_foldFM_GE(wz3, LT, Branch(EQ, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, LT, wz63, h, ba)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 > 3, 4 >= 4, 5 >= 5
- new_foldFM_GE(wz3, LT, Branch(LT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, LT, wz63, h, ba)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 > 2, 3 > 3, 4 >= 4, 5 >= 5
- new_foldFM_GE(wz3, LT, Branch(GT, wz61, wz62, wz63, wz64), h, ba) → new_foldFM_GE(wz3, LT, wz64, h, ba)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 > 3, 4 >= 4, 5 >= 5